package extends_.exer1;

/**
 * Created with IntelliJ IDEA.
 * ClassName: Mankind
 * Package: extends_.exer1
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-11-21
 * Time: 22:26
 */

public class Mankind {


    private int sex;

    private int salary;

    public Mankind() {
    }

    public Mankind(int sex, int salary) {
        this.sex = sex;
        this.salary = salary;
    }

    public void manOrWoman() {
        if (sex == 1) {
            System.out.println("Man");
        } else if (sex == 0) {
            System.out.println("Woman");
        }
    }


    public void employee(){
        if (salary == 0){
            System.out.println("no job!");
        }else {
            System.out.println("job!");
        }
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getSalary() {
        return salary;
    }

    public void setSalary(int salary) {
        this.salary = salary;
    }
}
